// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file ddsProtocol.h
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool fastddsgen.
 */

#ifndef _FAST_DDS_GENERATED_DDSPROTOCOL_H_
#define _FAST_DDS_GENERATED_DDSPROTOCOL_H_

#include <array>
#include <bitset>
#include <cstdint>
#include <map>
#include <string>
#include <vector>

#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>



#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(DDSPROTOCOL_SOURCE)
#define DDSPROTOCOL_DllAPI __declspec( dllexport )
#else
#define DDSPROTOCOL_DllAPI __declspec( dllimport )
#endif // DDSPROTOCOL_SOURCE
#else
#define DDSPROTOCOL_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define DDSPROTOCOL_DllAPI
#endif // _WIN32

namespace eprosima {
namespace fastcdr {
class Cdr;
class CdrSizeCalculator;
} // namespace fastcdr
} // namespace eprosima





/*!
 * @brief This class represents the structure ProtocolSuite defined by the user in the IDL file.
 * @ingroup ddsProtocol
 */
class ProtocolSuite
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport ProtocolSuite();

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~ProtocolSuite();

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object ProtocolSuite that will be copied.
     */
    eProsima_user_DllExport ProtocolSuite(
            const ProtocolSuite& x);

    /*!
     * @brief Move constructor.
     * @param x Reference to the object ProtocolSuite that will be copied.
     */
    eProsima_user_DllExport ProtocolSuite(
            ProtocolSuite&& x) noexcept;

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object ProtocolSuite that will be copied.
     */
    eProsima_user_DllExport ProtocolSuite& operator =(
            const ProtocolSuite& x);

    /*!
     * @brief Move assignment.
     * @param x Reference to the object ProtocolSuite that will be copied.
     */
    eProsima_user_DllExport ProtocolSuite& operator =(
            ProtocolSuite&& x) noexcept;

    /*!
     * @brief Comparison operator.
     * @param x ProtocolSuite object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const ProtocolSuite& x) const;

    /*!
     * @brief Comparison operator.
     * @param x ProtocolSuite object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const ProtocolSuite& x) const;

    /*!
     * @brief This function sets a value in member DevType
     * @param _DevType New value for member DevType
     */
    eProsima_user_DllExport void DevType(
            uint8_t _DevType);

    /*!
     * @brief This function returns the value of member DevType
     * @return Value of member DevType
     */
    eProsima_user_DllExport uint8_t DevType() const;

    /*!
     * @brief This function returns a reference to member DevType
     * @return Reference to member DevType
     */
    eProsima_user_DllExport uint8_t& DevType();


    /*!
     * @brief This function sets a value in member SrcDevType
     * @param _SrcDevType New value for member SrcDevType
     */
    eProsima_user_DllExport void SrcDevType(
            uint8_t _SrcDevType);

    /*!
     * @brief This function returns the value of member SrcDevType
     * @return Value of member SrcDevType
     */
    eProsima_user_DllExport uint8_t SrcDevType() const;

    /*!
     * @brief This function returns a reference to member SrcDevType
     * @return Reference to member SrcDevType
     */
    eProsima_user_DllExport uint8_t& SrcDevType();


    /*!
     * @brief This function sets a value in member SrcDevNum
     * @param _SrcDevNum New value for member SrcDevNum
     */
    eProsima_user_DllExport void SrcDevNum(
            uint8_t _SrcDevNum);

    /*!
     * @brief This function returns the value of member SrcDevNum
     * @return Value of member SrcDevNum
     */
    eProsima_user_DllExport uint8_t SrcDevNum() const;

    /*!
     * @brief This function returns a reference to member SrcDevNum
     * @return Reference to member SrcDevNum
     */
    eProsima_user_DllExport uint8_t& SrcDevNum();


    /*!
     * @brief This function sets a value in member DstDevType
     * @param _DstDevType New value for member DstDevType
     */
    eProsima_user_DllExport void DstDevType(
            uint8_t _DstDevType);

    /*!
     * @brief This function returns the value of member DstDevType
     * @return Value of member DstDevType
     */
    eProsima_user_DllExport uint8_t DstDevType() const;

    /*!
     * @brief This function returns a reference to member DstDevType
     * @return Reference to member DstDevType
     */
    eProsima_user_DllExport uint8_t& DstDevType();


    /*!
     * @brief This function sets a value in member DstDevNum
     * @param _DstDevNum New value for member DstDevNum
     */
    eProsima_user_DllExport void DstDevNum(
            uint8_t _DstDevNum);

    /*!
     * @brief This function returns the value of member DstDevNum
     * @return Value of member DstDevNum
     */
    eProsima_user_DllExport uint8_t DstDevNum() const;

    /*!
     * @brief This function returns a reference to member DstDevNum
     * @return Reference to member DstDevNum
     */
    eProsima_user_DllExport uint8_t& DstDevNum();


    /*!
     * @brief This function sets a value in member CmdType
     * @param _CmdType New value for member CmdType
     */
    eProsima_user_DllExport void CmdType(
            uint8_t _CmdType);

    /*!
     * @brief This function returns the value of member CmdType
     * @return Value of member CmdType
     */
    eProsima_user_DllExport uint8_t CmdType() const;

    /*!
     * @brief This function returns a reference to member CmdType
     * @return Reference to member CmdType
     */
    eProsima_user_DllExport uint8_t& CmdType();


    /*!
     * @brief This function sets a value in member CmdChildType
     * @param _CmdChildType New value for member CmdChildType
     */
    eProsima_user_DllExport void CmdChildType(
            uint8_t _CmdChildType);

    /*!
     * @brief This function returns the value of member CmdChildType
     * @return Value of member CmdChildType
     */
    eProsima_user_DllExport uint8_t CmdChildType() const;

    /*!
     * @brief This function returns a reference to member CmdChildType
     * @return Reference to member CmdChildType
     */
    eProsima_user_DllExport uint8_t& CmdChildType();


    /*!
     * @brief This function sets a value in member devState
     * @param _devState New value for member devState
     */
    eProsima_user_DllExport void devState(
            uint8_t _devState);

    /*!
     * @brief This function returns the value of member devState
     * @return Value of member devState
     */
    eProsima_user_DllExport uint8_t devState() const;

    /*!
     * @brief This function returns a reference to member devState
     * @return Reference to member devState
     */
    eProsima_user_DllExport uint8_t& devState();


    /*!
     * @brief This function sets a value in member DataLen
     * @param _DataLen New value for member DataLen
     */
    eProsima_user_DllExport void DataLen(
            uint32_t _DataLen);

    /*!
     * @brief This function returns the value of member DataLen
     * @return Value of member DataLen
     */
    eProsima_user_DllExport uint32_t DataLen() const;

    /*!
     * @brief This function returns a reference to member DataLen
     * @return Reference to member DataLen
     */
    eProsima_user_DllExport uint32_t& DataLen();


    /*!
     * @brief This function copies the value in member Message
     * @param _Message New value to be copied in member Message
     */
    eProsima_user_DllExport void Message(
            const std::vector<uint8_t>& _Message);

    /*!
     * @brief This function moves the value in member Message
     * @param _Message New value to be moved in member Message
     */
    eProsima_user_DllExport void Message(
            std::vector<uint8_t>&& _Message);

    /*!
     * @brief This function returns a constant reference to member Message
     * @return Constant reference to member Message
     */
    eProsima_user_DllExport const std::vector<uint8_t>& Message() const;

    /*!
     * @brief This function returns a reference to member Message
     * @return Reference to member Message
     */
    eProsima_user_DllExport std::vector<uint8_t>& Message();


    /*!
     * @brief This function sets a value in member Index
     * @param _Index New value for member Index
     */
    eProsima_user_DllExport void Index(
            uint32_t _Index);

    /*!
     * @brief This function returns the value of member Index
     * @return Value of member Index
     */
    eProsima_user_DllExport uint32_t Index() const;

    /*!
     * @brief This function returns a reference to member Index
     * @return Reference to member Index
     */
    eProsima_user_DllExport uint32_t& Index();

private:

    uint8_t m_DevType{0};
    uint8_t m_SrcDevType{0};
    uint8_t m_SrcDevNum{0};
    uint8_t m_DstDevType{0};
    uint8_t m_DstDevNum{0};
    uint8_t m_CmdType{0};
    uint8_t m_CmdChildType{0};
    uint8_t m_devState{0};
    uint32_t m_DataLen{0};
    std::vector<uint8_t> m_Message;
    uint32_t m_Index{0};

};


/*!
 * @brief This class represents the structure text_message defined by the user in the IDL file.
 * @ingroup ddsProtocol
 */
class text_message
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport text_message();

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~text_message();

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object text_message that will be copied.
     */
    eProsima_user_DllExport text_message(
            const text_message& x);

    /*!
     * @brief Move constructor.
     * @param x Reference to the object text_message that will be copied.
     */
    eProsima_user_DllExport text_message(
            text_message&& x) noexcept;

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object text_message that will be copied.
     */
    eProsima_user_DllExport text_message& operator =(
            const text_message& x);

    /*!
     * @brief Move assignment.
     * @param x Reference to the object text_message that will be copied.
     */
    eProsima_user_DllExport text_message& operator =(
            text_message&& x) noexcept;

    /*!
     * @brief Comparison operator.
     * @param x text_message object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const text_message& x) const;

    /*!
     * @brief Comparison operator.
     * @param x text_message object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const text_message& x) const;

    /*!
     * @brief This function copies the value in member from
     * @param _from New value to be copied in member from
     */
    eProsima_user_DllExport void from(
            const std::string& _from);

    /*!
     * @brief This function moves the value in member from
     * @param _from New value to be moved in member from
     */
    eProsima_user_DllExport void from(
            std::string&& _from);

    /*!
     * @brief This function returns a constant reference to member from
     * @return Constant reference to member from
     */
    eProsima_user_DllExport const std::string& from() const;

    /*!
     * @brief This function returns a reference to member from
     * @return Reference to member from
     */
    eProsima_user_DllExport std::string& from();


    /*!
     * @brief This function copies the value in member to
     * @param _to New value to be copied in member to
     */
    eProsima_user_DllExport void to(
            const std::string& _to);

    /*!
     * @brief This function moves the value in member to
     * @param _to New value to be moved in member to
     */
    eProsima_user_DllExport void to(
            std::string&& _to);

    /*!
     * @brief This function returns a constant reference to member to
     * @return Constant reference to member to
     */
    eProsima_user_DllExport const std::string& to() const;

    /*!
     * @brief This function returns a reference to member to
     * @return Reference to member to
     */
    eProsima_user_DllExport std::string& to();


    /*!
     * @brief This function copies the value in member msg
     * @param _msg New value to be copied in member msg
     */
    eProsima_user_DllExport void msg(
            const std::string& _msg);

    /*!
     * @brief This function moves the value in member msg
     * @param _msg New value to be moved in member msg
     */
    eProsima_user_DllExport void msg(
            std::string&& _msg);

    /*!
     * @brief This function returns a constant reference to member msg
     * @return Constant reference to member msg
     */
    eProsima_user_DllExport const std::string& msg() const;

    /*!
     * @brief This function returns a reference to member msg
     * @return Reference to member msg
     */
    eProsima_user_DllExport std::string& msg();

private:

    std::string m_from;
    std::string m_to;
    std::string m_msg;

};

#endif // _FAST_DDS_GENERATED_DDSPROTOCOL_H_



